﻿#include "paintwidget.h"
#include "ui_paintwidget.h"
#include <QPainter>
PaintWidget::PaintWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PaintWidget)
{
    ui->setupUi(this);
}

PaintWidget::~PaintWidget()
{
    delete ui;
}

void PaintWidget::paintEvent(QPaintEvent *event)
{
    //在这里进行重绘
    QPainter painter(this);
    painter.drawPixmap(QRect(0,0,1280,360), QPixmap(":/2.PNG"));

//    painter.setPen(QColor(0, 200, 0));
//    painter.setBrush(QColor(0, 0, 200));
//    QPolygon  small_tri1_2 = QPolygon();
//    small_tri1_2.setPoints(800, 280, 850, 280, 850, 330, 800, 280);
//    painter.drawPolygon(small_tri1_2);
}
